import request from '@/axios'
import type { TableData } from './types'

export const getTableListApi = (params: any) => {
  return request.get({ url: '/community/admin/mp/doc/list', params })
}

export const saveTableApi = (data: Partial<TableData>): Promise<IResponse> => {
  return request.post({ url: '/community/admin/mp/doc', data })
}

export const updateTableApi = (data: Partial<TableData>): Promise<IResponse> => {
  return request.put({ url: '/community/admin/mp/doc', data })
}

export const delTableListApi = (id: any): Promise<IResponse> => {
  return request.delete({ url: '/community/admin/mp/doc/' + id })
}
